<?php
Route::group(['prefix' => 'system', 'namespace' => 'System', 'as' => 'system.'], function () {

    //系统设置
    Route::resource('config', 'ConfigController', ['only' => ['index', 'update']]);

    // 清除缓存
    Route::get('cache', 'CacheController@index')->name('cache.index');
    Route::delete('cache', 'CacheController@destroy')->name('cache.destroy');

    //系统日志
    Route::get('logs', '\Rap2hpoutre\LaravelLogViewer\LogViewerController@index')->name('logs');

    // 用户权限
    Route::resource('permission', 'PermissionController');
    Route::resource('user', 'UserController');
    Route::resource('role', 'RoleController');

    //文件管理
    $this->get('file', 'FileController@index')->name('file.index');
    $this->post('file/upload', 'FileController@upload')->name('file.upload');
    $this->get('file/edit', 'FileController@edit')->name('file.edit');
    $this->put('file/update', 'FileController@update')->name('file.update');

    //进入目录
    $this->get('file/show', 'FileController@show')->name('file.show');

});